package com.yonyou.common.service.messagecenter.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.yonyou.common.service.messagecenter.interceptor.MessageAuthCheckInterceptor;

@Configuration
public class InterceptorConfigurer extends WebMvcConfigurerAdapter{

	@Bean
    public MessageAuthCheckInterceptor componentWebPageAuthInterceptor() {
         return new MessageAuthCheckInterceptor();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//    	InterceptorRegistration ir=registry.addInterceptor(componentWebPageAuthInterceptor());
//		ir.addPathPatterns("/**");
//        ir.excludePathPatterns("/message/user");
//        ir.excludePathPatterns("/failmessage/*");
//        super.addInterceptors(registry);
    }
}
